<script language="javascript">
function ConfigureOtherItems()
{
//The following functions are defined in Web Template "Tax Information Request Details - Configuration":
//CreateModal(targetParent, targetButton, modalID, modalTitleText, modalBodyText, modalButtonText)
//AddMessageBelowBooleanRadio(targetBooleanRadio, messageID, response0Text, response1Text)
//RevealElementsOnBooleanResponse1(targetBooleanRadio, elements)
//SetFieldRequired(fieldName, setRequired)
//SetRequiredBasedOnControlField(controlCheckbox, targetField)
var questionLabel = "empty";
//Transfer pricing
questionLabel = $("#tt_transferpricing").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_transferpricing", true);
//Question text
$("div.tt_transferpricing").html(`{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricing/Question'] }}`);
//Info modal
$("div.tt_transferpricing").append('<span style="float: right;"> <a href="#" id="tt_transferpricingInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_transferpricing", "#tt_transferpricingInfo", "tt_transferpricingInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricing/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_transferpricing").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_transferpricing", "tt_transferpricingResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricing/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricing/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_transferpricing", ["div.tt_transferpricingdetails", "#tt_transferpricingnotes", "tt_transferpricingdetails"]);
showDocumentsforSection("tt_transferpricing");
//Transfer pricing SME exemption
questionLabel = $("#tt_transferpricingsmeexemption").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_transferpricingsmeexemption", true);
//Question text
$("div.tt_transferpricingsmeexemption").html(`{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingSMEExemption/Question'] }}`);
//Info modal
$("div.tt_transferpricingsmeexemption").append('<span style="float: right;"> <a href="#" id="tt_transferpricingsmeexemptionInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_transferpricingsmeexemption", "#tt_transferpricingsmeexemptionInfo", "tt_transferpricingsmeexemptionInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingSMEExemption/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_transferpricingsmeexemption").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_transferpricingsmeexemption", "tt_transferpricingsmeexemptionResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingSMEExemption/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingSMEExemption/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_transferpricingsmeexemption", ["#tt_transferpricingsmeexemptiondetails", "#tt_transferpricingsmeexemptionnotes"]);
showDocumentsforSection("tt_transferpricingsmeexemption");
//Details question text
$("div.tt_transferpricingsmeexemptiondetails").html(`{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingSMEExemption/Details'] }}`);
//Transfer pricing profit fragmentation
questionLabel = $("#tt_transferpricingprofitfragmentation").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_transferpricingprofitfragmentation", true);
//Question text
$("div.tt_transferpricingprofitfragmentation").html(`{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingProfitFrag/Question'] }}`);
//Info modal
$("div.tt_transferpricingprofitfragmentation").append('<span style="float: right;"> <a href="#" id="tt_transferpricingprofitfragmentationInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_transferpricingprofitfragmentation", "#tt_transferpricingprofitfragmentationInfo", "tt_transferpricingprofitfragmentationInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingProfitFrag/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_transferpricingprofitfragmentation").after("<br>");
//Response text
AddMessageBelowBooleanRadio("#tt_transferpricingprofitfragmentation", "tt_transferpricingprofitfragmentationResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingProfitFrag/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/TransferPricingProfitFrag/Response1Message'] }}`);
//Anti-hybrid mismatch rules
questionLabel = $("#tt_antihybridmismatchrules").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_antihybridmismatchrules", true);
//Question text
$("div.tt_antihybridmismatchrules").html(`{{ snippets['PracticeGateway/TIR/OtherItems/AntiHybridMismatchRules/Question'] }}`);
//Info modal
$("div.tt_antihybridmismatchrules").append('<span style="float: right;"> <a href="#" id="tt_antihybridmismatchrulesInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_antihybridmismatchrules", "#tt_antihybridmismatchrulesInfo", "tt_antihybridmismatchrulesInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/AntiHybridMismatchRules/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_antihybridmismatchrules").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_antihybridmismatchrules", "tt_antihybridmismatchrulesResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/AntiHybridMismatchRules/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/AntiHybridMismatchRules/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_antihybridmismatchrules", ["#tt_antihybridmismatchrulesdetails", "#tt_antihybridmismatchrulesnotes"]);
showDocumentsforSection("tt_antihybridmismatchrules");
//Details question text
$("div.tt_antihybridmismatchrulesdetails").html(`{{ snippets['PracticeGateway/TIR/OtherItems/AntiHybridMismatchRules/Details'] }}`);
//Controlled foreign companies
questionLabel = $("#tt_controlledforeigncompanies").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_controlledforeigncompanies", true);
//Question text
$("div.tt_controlledforeigncompanies").html(`{{ snippets['PracticeGateway/TIR/OtherItems/ControlledForeignCompanies/Question'] }}`);
//Info modal
$("div.tt_controlledforeigncompanies").append('<span style="float: right;"> <a href="#" id="tt_controlledforeigncompaniesInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_controlledforeigncompanies", "#tt_controlledforeigncompaniesInfo", "tt_controlledforeigncompaniesInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/ControlledForeignCompanies/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_controlledforeigncompanies").after("<br>");
//Response text
AddMessageBelowBooleanRadio("#tt_controlledforeigncompanies", "tt_controlledforeigncompaniesResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/ControlledForeignCompanies/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/ControlledForeignCompanies/Response1Message'] }}`);
//Corporate interest restriction
questionLabel = $("#tt_corporateinterestrestriction").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_corporateinterestrestriction", true);
//Question text
$("div.tt_corporateinterestrestriction").html(`{{ snippets['PracticeGateway/TIR/OtherItems/CorporateInterestRestriction/Question'] }}`);
//Info modal
$("div.tt_corporateinterestrestriction").append('<span style="float: right;"> <a href="#" id="tt_corporateinterestrestrictionInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_corporateinterestrestriction", "#tt_corporateinterestrestrictionInfo", "tt_corporateinterestrestrictionInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/CorporateInterestRestriction/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_corporateinterestrestriction").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_corporateinterestrestriction", "tt_corporateinterestrestrictionResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/CorporateInterestRestriction/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/CorporateInterestRestriction/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_corporateinterestrestriction", ["#tt_corporateinterestrestrictionnotes"]);
showDocumentsforSection("tt_corporateinterestrestriction");
//Research and development (R&D)
questionLabel = $("#tt_researchanddevelopmentrd").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_researchanddevelopmentrd", true);
//Question text
$("div.tt_researchanddevelopmentrd").html(`{{ snippets['PracticeGateway/TIR/OtherItems/ResearchAndDevelopment/Question'] }}`);
//Info modal
$("div.tt_researchanddevelopmentrd").append('<span style="float: right;"> <a href="#" id="tt_researchanddevelopmentrdInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_researchanddevelopmentrd", "#tt_researchanddevelopmentrdInfo", "tt_researchanddevelopmentrdInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/ResearchAndDevelopment/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_researchanddevelopmentrd").after("<br>");
//Label for Documents Subgrid
//Input text
$("label[for='tt_researchanddevelopmentrd_1']").html(`{{ snippets['PracticeGateway/TIR/OtherItems/ResearchAndDevelopment/Response2Label'] }}`); //flipped because radio button order has been reversed by AFS Metadata
$("label[for='tt_researchanddevelopmentrd_0']").html(`{{ snippets['PracticeGateway/TIR/OtherItems/ResearchAndDevelopment/Response1Label'] }}`); //flipped because radio button order has been reversed by AFS Metadata
//Response text
AddMessageBelowBooleanRadio("#tt_researchanddevelopmentrd", "tt_researchanddevelopmentrdResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/ResearchAndDevelopment/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/ResearchAndDevelopment/Response1Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/ResearchAndDevelopment/Response2Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_researchanddevelopmentrd", ["#tt_researchanddevelopmentrdnotes"]);
showDocumentsforSection("tt_researchanddevelopmentrd");
//Patents
questionLabel = $("#tt_patents").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_patents", true);
//Question text
$("div.tt_patents").html(`{{ snippets['PracticeGateway/TIR/OtherItems/Patents/Question'] }}`);
//Info modal
$("div.tt_patents").append('<span style="float: right;"> <a href="#" id="tt_patentsInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_patents", "#tt_patentsInfo", "tt_patentsInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/Patents/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_patents").after("<br>");
//Label for Documents Subgrid
//Input text
$("label[for='tt_patents_1']").html(`{{ snippets['PracticeGateway/TIR/OtherItems/Patents/Response2Label'] }}`); //flipped because radio button order has been reversed by AFS Metadata
$("label[for='tt_patents_0']").html(`{{ snippets['PracticeGateway/TIR/OtherItems/Patents/Response1Label'] }}`); //flipped because radio button order has been reversed by AFS Metadata
//Response text
AddMessageBelowBooleanRadio("#tt_patents", "tt_patentsResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/Patents/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/Patents/Response1Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/Patents/Response2Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_patents", ["#tt_patentsnotes"]);
showDocumentsforSection("tt_patents");
//Portfolio investment income, gains and losses
questionLabel = $("#tt_portfolioinvestmentincome").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_portfolioinvestmentincome", true);
//Question text
$("div.tt_portfolioinvestmentincome").html(`{{ snippets['PracticeGateway/TIR/OtherItems/PortfolioInvestmentIncome/Question'] }}`);
//Info modal
$("div.tt_portfolioinvestmentincome").append('<span style="float: right;"> <a href="#" id="tt_portfolioinvestmentincomeInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_portfolioinvestmentincome", "#tt_portfolioinvestmentincomeInfo", "tt_portfolioinvestmentincomeInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/PortfolioInvestmentIncome/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_portfolioinvestmentincome").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_portfolioinvestmentincome", "tt_portfolioinvestmentincomeResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/PortfolioInvestmentIncome/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/PortfolioInvestmentIncome/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_portfolioinvestmentincome", ["#tt_portfolioinvestmentincomenotes"]);
showDocumentsforSection("tt_portfolioinvestmentincome");
//Electricity generator levy (EGL)
questionLabel = $("#tt_electricitygeneratorlevyegl").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_electricitygeneratorlevyegl", true);
//Question text
$("div.tt_electricitygeneratorlevyegl").html(`{{ snippets['PracticeGateway/TIR/OtherItems/ElectricityGeneratorLevy/Question'] }}`);
//Info modal
$("div.tt_electricitygeneratorlevyegl").append('<span style="float: right;"> <a href="#" id="tt_electricitygeneratorlevyeglInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_electricitygeneratorlevyegl", "#tt_electricitygeneratorlevyeglInfo", "tt_electricitygeneratorlevyeglInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/OtherItems/ElectricityGeneratorLevy/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_electricitygeneratorlevyegl").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_electricitygeneratorlevyegl", "tt_electricitygeneratorlevyeglResponseMessage", `{{ snippets['PracticeGateway/TIR/OtherItems/ElectricityGeneratorLevy/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/OtherItems/ElectricityGeneratorLevy/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_electricitygeneratorlevyegl", ["#tt_electricitygeneratorlevyeglnotes"]);
showDocumentsforSection("tt_electricitygeneratorlevyegl");
}
</script>